function CreateConfirmWindow()
{
	 var defer = $.Deferred();
	
	 $('body').append('<div id="ConfirmWindows" title="Confirm Window"><div style="padding: 0 .7em;"><p>Are you sure you want to perform this action?</p></div></div>');
	$('#ConfirmWindows').dialog(
	{
		modal: true,
		buttons: 
		{
			Ok: function()
			{
				defer.resolve("yes");	
				$(this).dialog( "close" ); //Close the Dialog
				$(this).remove();	//Remove all the appended Dom and its assocciated events
			},
			
			Cancel: function()
			{
				defer.reject("no");
				$(this).dialog( "close" ); //Close the Dialog
				$(this).remove();	//Remove all the appended Dom and its assocciated events
			}
		},
		close: function(event, ui)
		{
			$(this).dialog( "close" ); //Close the Dialog
			$(this).remove();	//Remove all the appended Dom and its assocciated events
		}
	});
	 return defer.promise();
}